﻿using System;

namespace LinkDownloader.Core
{

    /// <summary>
    /// A delegate to be used for invoking methods via another thread.
    /// </summary>
    /// <param name="obj">An object containing the arguments.</param>
    public delegate void ChangeCallBack(object obj);
    
    /// <summary>
    /// EventArgs deravation that is to be used in ChangeEventHandler delegates.
    /// </summary>
    public class ChangedEventArgs : EventArgs
    {

        private string message = string.Empty;
        public string Message
        {
            get { return this.message; }
            set { this.message = value; }
        }

        private bool success = false;
        public bool Success
        {
            get { return this.success; }
            set { this.success = value; }
        }

        private object arg = false;
        public object Argument
        {
            get { return this.arg; }
            set { this.arg = value; }
        }

    }

    /// <summary>
    /// Enum type that holds all the Statuses that a single download job can be in.
    /// </summary>
    public enum DownloadStatus
    {
        None,
        Connecting,
        Redirecting,
        Error,
        Skipped,
        Downloading,
        Paused,
        Cancelled,
        Completed,
        Authenticate
    };
        
}
